package com.company;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @author Administrator
 */
public class HJ11数字颠倒 {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int input = scanner.nextInt();
        String string = String.valueOf(input);

        String string1 = new StringBuffer(string).reverse().toString();
        System.out.println(Integer.valueOf(string1));
    }



}
